import { UIScrollBar } from "../../../../fl/controls/UIScrollBar";
import { InvalidationType } from "../../../../fl/core/InvalidationType";
//class ResizableUIScrollBar
    
    export  class ResizableUIScrollBar extends UIScrollBar
    {
       

        protected /* override */ draw(): void
        {
            var loc1=NaN;
            if (isInvalid(InvalidationType.DATA)) 
            {
                updateScrollTargetProperties();
            }
            if (isInvalid(InvalidationType.SIZE)) 
            {
                loc1 = super.height;
                downArrow.setSize(_width, _width);
                upArrow.setSize(_width, _width);
                downArrow.move(0, Math.max(upArrow.height, loc1 - downArrow.height));
                track.move(0, _width);
                track.setSize(_width, Math.max(0, loc1 - (downArrow.height + upArrow.height)));
                thumb.setSize(_width, thumb.height);
                updateThumb();
            }
            if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)) 
            {
                setStyles();
            }
            downArrow.drawNow();
            upArrow.drawNow();
            track.drawNow();
            thumb.drawNow();
            validate();
            return;
        }
    }
